package com.ledi.guns.modular.ledipay.controller.feignClients;

import java.util.List;
import java.util.Map;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import com.ledi.guns.common.persistence.page.PageQuery;
import com.ledi.guns.modular.ledipay.controller.feignClients.req.SmsBuyRecord;
import com.ledi.guns.modular.ledipay.controller.feignClients.req.SmsPackageReq;
import com.ledi.guns.modular.ledipay.controller.feignClients.req.SmsSchoolBuyRecord;
import com.ledi.guns.modular.ledipay.controller.feignClients.req.SmsSchoolGiveReq;
import com.ledi.guns.modular.ledipay.controller.feignClients.req.SmsSchoolRecord;
import com.ledi.guns.modular.ledipay.controller.feignClients.req.SmsSchoolReq;
import com.ledi.guns.modular.ledipay.controller.req.SmsMessageReq;

/**
 * 文件名称： com.ledi.guns.modular.ledipay.controller.feignClients.SmsApi.java<br/>
 * 初始作者： 钟小平<br/>
 * 创建日期： 2018年7月9日<br/>
 * 功能说明： 短信API <br/>
 * =================================================<br/>
 * 修改记录：<br/>
 * 修改作者 日期 修改内容<br/>
 * ================================================<br/>
 * Copyright (乐迪教育科技有限公司-幼儿事业部) 2017-2018.All rights reserved.<br/>
 */
@FeignClient(name = "sms-service")
@RequestMapping("sms")
public interface SmsApi {

	@RequestMapping(value = "sendMessage", method = RequestMethod.POST)
	Map<String, Object> sendMessage(@RequestBody SmsMessageReq req);

	@RequestMapping(value = "smsPackage/list", method = RequestMethod.GET)
	Map<String, Object> smsPackageList(@RequestParam(required = false, value = "status") Integer status);

	@RequestMapping(value = "smsPackage/add", method = RequestMethod.POST)
	Map<String, Object> addSmsPackage(@RequestBody SmsPackageReq param);

	@RequestMapping(value = "smsPackage/get/{id}", method = RequestMethod.GET)
	Map<String, Object> getSmsPackageById(@PathVariable("id") Long id);

	@RequestMapping(value = "smsPackage/delete", method = RequestMethod.DELETE)
	Map<String, Object> delete(@RequestBody SmsPackageReq param);

	@RequestMapping(value = "smsSchoolgive/add", method = RequestMethod.POST)
	Map<String, Object> addSmsSchoolGive(@RequestBody SmsSchoolGiveReq param);

	@RequestMapping(value = "smsSchoolgive/addList", method = RequestMethod.POST)
	Map<String, Object> addSmsSchoolGiveList(@RequestBody List<SmsSchoolGiveReq> list);

	@RequestMapping(value = "officialPrice/list", method = RequestMethod.GET)
	Map<String, Object> officialPrice();

	@RequestMapping(value = "schoolRecord/list", method = RequestMethod.POST)
	Map<String, Object> schoolRecordList(@RequestBody SmsSchoolReq param);

	@RequestMapping(value = "schoolRecord/{orderNo}", method = RequestMethod.GET)
	Map<String, Object> getSchoolRecord(@PathVariable("orderNo") String orderNo);

	@RequestMapping(value = "schoolRecord/add", method = RequestMethod.POST)
	Map<String, Object> addSchoolRecord(@RequestBody SmsSchoolRecord param);

	@RequestMapping(value = "smsBuy/add", method = RequestMethod.POST)
	Map<String, Object> smsBuyAdd(@RequestBody SmsBuyRecord param);

	@RequestMapping(value = "smsBuy/list", method = RequestMethod.POST)
	Map<String, Object> smsBuyList(@RequestBody PageQuery param);

	@RequestMapping(value = "smsBuy/smsBuyBalance", method = RequestMethod.GET)
	Map<String, Object> getTopSmsBuyBalance();

	@RequestMapping(value = "schoolBuyRecord/add", method = RequestMethod.POST)
	Map<String, Object> smsSchoolBuyAdd(@RequestBody SmsSchoolBuyRecord param);

	@RequestMapping(value = "schoolBuyRecord/reduce", method = RequestMethod.POST)
	Map<String, Object> smsSchoolBuyReduce(@RequestBody SmsSchoolBuyRecord param);

	@RequestMapping(value = "schoolBuyRecord/balanceCount/{schoolId}", method = RequestMethod.GET)
	Map<String, Object> getSmsSchoolBuy(@PathVariable("schoolId") Long schoolId);

	@RequestMapping(value = "smsSchoolgive/balanceCount/{schoolId}/{freeMonth}", method = RequestMethod.GET)
	Map<String, Object> getSmsSchoolgive(@PathVariable("schoolId") Long schoolId, @PathVariable("freeMonth") String freeMonth);

	@RequestMapping(value = "smsSchoolgive", method = RequestMethod.GET)
	Map<String, Object> smsSchoolgive();

}
